<?php

declare(strict_types=1);
/**
 * Created by Vscode
 * User: ChenP
 * Date: 2021-12-03 17:00
 */
namespace App\Controller;

use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\AutoController;
use App\Services\PointsRankingService;

/**
 * @AutoController
 */
class PointsRankingController extends AbstractController
{
    /**
     * @Inject()
     * @var PointsRankingService
     */
    protected $pointsRankingService;

    public function ranking()
    {
        $params = $this->validate();

        $data = $this->pointsRankingService->ranking($params);

        return $this->send($data);
    }

}
